3.524 \(\int \frac{(i+j x)^2 (a+b \log (c (d (e+f x)^p)^q))}{g+h x} \, dx\)

Optimal. Leaf size=258 \[ \frac{b p q (h i-g j)^2 \text{PolyLog}\left (2,-\frac{h (e+f x)}{f g-e h}\right )}{h^3}+\frac{(h i-g j)^2 \log \left (\frac{f (g+h x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h^3}+\frac{(i+j x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 h}+\frac{a j x (h i-g j)}{h^2}+\frac{b j (e+f x) (h i-g j) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f h^2}-\frac{b p q (f i-e j)^2 \log (e+f x)}{2 f^2 h}-\frac{b j p q x (f i-e j)}{2 f h}-\frac{b j p q x (h i-g j)}{h^2}-\frac{b p q (i+j x)^2}{4 h} \]

[Out]

(a*j*(h*i - g*j)*x)/h^2 - (b*j*(f*i - e*j)*p*q*x)/(2*f*h) - (b*j*(h*i - g*j)*p*q*x)/h^2 - (b*p*q*(i + j*x)^2)/
(4*h) - (b*(f*i - e*j)^2*p*q*Log[e + f*x])/(2*f^2*h) + (b*j*(h*i - g*j)*(e + f*x)*Log[c*(d*(e + f*x)^p)^q])/(f
*h^2) + ((i + j*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(2*h) + ((h*i - g*j)^2*(a + b*Log[c*(d*(e + f*x)^p)^q])
*Log[(f*(g + h*x))/(f*g - e*h)])/h^3 + (b*(h*i - g*j)^2*p*q*PolyLog[2, -((h*(e + f*x))/(f*g - e*h))])/h^3

________________________________________________________________________________________

Rubi [A]  time = 0.544584, antiderivative size = 258, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 9, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {2418, 2389, 2295, 2394, 2393, 2391, 2395, 43, 2445} \[ \frac{b p q (h i-g j)^2 \text{PolyLog}\left (2,-\frac{h (e+f x)}{f g-e h}\right )}{h^3}+\frac{(h i-g j)^2 \log \left (\frac{f (g+h x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h^3}+\frac{(i+j x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 h}+\frac{a j x (h i-g j)}{h^2}+\frac{b j (e+f x) (h i-g j) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f h^2}-\frac{b p q (f i-e j)^2 \log (e+f x)}{2 f^2 h}-\frac{b j p q x (f i-e j)}{2 f h}-\frac{b j p q x (h i-g j)}{h^2}-\frac{b p q (i+j x)^2}{4 h} \]

Antiderivative was successfully verified.

[In]

Int[((i + j*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(g + h*x),x]

[Out]

(a*j*(h*i - g*j)*x)/h^2 - (b*j*(f*i - e*j)*p*q*x)/(2*f*h) - (b*j*(h*i - g*j)*p*q*x)/h^2 - (b*p*q*(i + j*x)^2)/
(4*h) - (b*(f*i - e*j)^2*p*q*Log[e + f*x])/(2*f^2*h) + (b*j*(h*i - g*j)*(e + f*x)*Log[c*(d*(e + f*x)^p)^q])/(f
*h^2) + ((i + j*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(2*h) + ((h*i - g*j)^2*(a + b*Log[c*(d*(e + f*x)^p)^q])
*Log[(f*(g + h*x))/(f*g - e*h)])/h^3 + (b*(h*i - g*j)^2*p*q*PolyLog[2, -((h*(e + f*x))/(f*g - e*h))])/h^3

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2393

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + (c*e*x)/g])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2445

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps

\begin{align*} \int \frac{(524+j x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{g+h x} \, dx &=\operatorname{Subst}\left (\int \frac{(524+j x)^2 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )}{g+h x} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\operatorname{Subst}\left (\int \left (\frac{j (524 h-g j) \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )}{h^2}+\frac{(524 h-g j)^2 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )}{h^2 (g+h x)}+\frac{j (524+j x) \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )}{h}\right ) \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\operatorname{Subst}\left (\frac{j \int (524+j x) \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right ) \, dx}{h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{(j (524 h-g j)) \int \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right ) \, dx}{h^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\operatorname{Subst}\left (\frac{(524 h-g j)^2 \int \frac{a+b \log \left (c d^q (e+f x)^{p q}\right )}{g+h x} \, dx}{h^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{a j (524 h-g j) x}{h^2}+\frac{(524+j x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 h}+\frac{(524 h-g j)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac{f (g+h x)}{f g-e h}\right )}{h^3}+\operatorname{Subst}\left (\frac{(b j (524 h-g j)) \int \log \left (c d^q (e+f x)^{p q}\right ) \, dx}{h^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\operatorname{Subst}\left (\frac{(b f p q) \int \frac{(524+j x)^2}{e+f x} \, dx}{2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\operatorname{Subst}\left (\frac{\left (b f (524 h-g j)^2 p q\right ) \int \frac{\log \left (\frac{f (g+h x)}{f g-e h}\right )}{e+f x} \, dx}{h^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{a j (524 h-g j) x}{h^2}+\frac{(524+j x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 h}+\frac{(524 h-g j)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac{f (g+h x)}{f g-e h}\right )}{h^3}+\operatorname{Subst}\left (\frac{(b j (524 h-g j)) \operatorname{Subst}\left (\int \log \left (c d^q x^{p q}\right ) \, dx,x,e+f x\right )}{f h^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\operatorname{Subst}\left (\frac{(b f p q) \int \left (\frac{j (524 f-e j)}{f^2}+\frac{(524 f-e j)^2}{f^2 (e+f x)}+\frac{j (524+j x)}{f}\right ) \, dx}{2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\operatorname{Subst}\left (\frac{\left (b (524 h-g j)^2 p q\right ) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{h x}{f g-e h}\right )}{x} \, dx,x,e+f x\right )}{h^3},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac{a j (524 h-g j) x}{h^2}-\frac{b j (524 f-e j) p q x}{2 f h}-\frac{b j (524 h-g j) p q x}{h^2}-\frac{b p q (524+j x)^2}{4 h}-\frac{b (524 f-e j)^2 p q \log (e+f x)}{2 f^2 h}+\frac{b j (524 h-g j) (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f h^2}+\frac{(524+j x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 h}+\frac{(524 h-g j)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac{f (g+h x)}{f g-e h}\right )}{h^3}+\frac{b (524 h-g j)^2 p q \text{Li}_2\left (-\frac{h (e+f x)}{f g-e h}\right )}{h^3}\\ \end{align*}

Mathematica [A]  time = 0.296129, size = 231, normalized size = 0.9 \[ \frac{4 b f^2 p q (h i-g j)^2 \text{PolyLog}\left (2,\frac{h (e+f x)}{e h-f g}\right )+f \left (h j x (2 a f (-2 g j+4 h i+h j x)+b p q (2 e h j-f (-4 g j+8 h i+h j x)))+4 a f (h i-g j)^2 \log \left (\frac{f (g+h x)}{f g-e h}\right )+2 b \log \left (c \left (d (e+f x)^p\right )^q\right ) \left (h j (e (4 h i-2 g j)+f x (-2 g j+4 h i+h j x))+2 f (h i-g j)^2 \log \left (\frac{f (g+h x)}{f g-e h}\right )\right )\right )-2 b e^2 h^2 j^2 p q \log (e+f x)}{4 f^2 h^3} \]

Antiderivative was successfully verified.

[In]

Integrate[((i + j*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(g + h*x),x]

[Out]

(-2*b*e^2*h^2*j^2*p*q*Log[e + f*x] + f*(h*j*x*(2*a*f*(4*h*i - 2*g*j + h*j*x) + b*p*q*(2*e*h*j - f*(8*h*i - 4*g
*j + h*j*x))) + 4*a*f*(h*i - g*j)^2*Log[(f*(g + h*x))/(f*g - e*h)] + 2*b*Log[c*(d*(e + f*x)^p)^q]*(h*j*(e*(4*h
*i - 2*g*j) + f*x*(4*h*i - 2*g*j + h*j*x)) + 2*f*(h*i - g*j)^2*Log[(f*(g + h*x))/(f*g - e*h)])) + 4*b*f^2*(h*i
 - g*j)^2*p*q*PolyLog[2, (h*(e + f*x))/(-(f*g) + e*h)])/(4*f^2*h^3)

________________________________________________________________________________________

Maple [F]  time = 0.865, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( jx+i \right ) ^{2} \left ( a+b\ln \left ( c \left ( d \left ( fx+e \right ) ^{p} \right ) ^{q} \right ) \right ) }{hx+g}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((j*x+i)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))/(h*x+g),x)

[Out]

int((j*x+i)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))/(h*x+g),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} 2 \, a i j{\left (\frac{x}{h} - \frac{g \log \left (h x + g\right )}{h^{2}}\right )} + \frac{1}{2} \, a j^{2}{\left (\frac{2 \, g^{2} \log \left (h x + g\right )}{h^{3}} + \frac{h x^{2} - 2 \, g x}{h^{2}}\right )} + \frac{a i^{2} \log \left (h x + g\right )}{h} + \int \frac{{\left (j^{2} \log \left (c\right ) + j^{2} \log \left (d^{q}\right )\right )} b x^{2} + 2 \,{\left (i j \log \left (c\right ) + i j \log \left (d^{q}\right )\right )} b x +{\left (i^{2} \log \left (c\right ) + i^{2} \log \left (d^{q}\right )\right )} b +{\left (b j^{2} x^{2} + 2 \, b i j x + b i^{2}\right )} \log \left ({\left ({\left (f x + e\right )}^{p}\right )}^{q}\right )}{h x + g}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((j*x+i)^2*(a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g),x, algorithm="maxima")

[Out]

2*a*i*j*(x/h - g*log(h*x + g)/h^2) + 1/2*a*j^2*(2*g^2*log(h*x + g)/h^3 + (h*x^2 - 2*g*x)/h^2) + a*i^2*log(h*x
+ g)/h + integrate(((j^2*log(c) + j^2*log(d^q))*b*x^2 + 2*(i*j*log(c) + i*j*log(d^q))*b*x + (i^2*log(c) + i^2*
log(d^q))*b + (b*j^2*x^2 + 2*b*i*j*x + b*i^2)*log(((f*x + e)^p)^q))/(h*x + g), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{a j^{2} x^{2} + 2 \, a i j x + a i^{2} +{\left (b j^{2} x^{2} + 2 \, b i j x + b i^{2}\right )} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{h x + g}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((j*x+i)^2*(a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g),x, algorithm="fricas")

[Out]

integral((a*j^2*x^2 + 2*a*i*j*x + a*i^2 + (b*j^2*x^2 + 2*b*i*j*x + b*i^2)*log(((f*x + e)^p*d)^q*c))/(h*x + g),
 x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((j*x+i)**2*(a+b*ln(c*(d*(f*x+e)**p)**q))/(h*x+g),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (j x + i\right )}^{2}{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}}{h x + g}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((j*x+i)^2*(a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g),x, algorithm="giac")

[Out]

integrate((j*x + i)^2*(b*log(((f*x + e)^p*d)^q*c) + a)/(h*x + g), x)